Skip to content

upgrade build tools - #2649

Open
ridam-arora wants to merge 14 commits into
devfrom
recovery/sdk37-20261116
Open

ridam-arora wants to merge 14 commits into
devfrom
recovery/sdk37-20261116

Conversation

@ridam-arora

Copy link
Copy Markdown

No description provided.

ridam-arora and others added 12 commits July 22, 2026 21:54
- Gradle wrapper 8.11.1->9.3.1, AGP 8.10.0->9.1.1, Kotlin 1.8.0->2.2.21

- compileSdk 36->37, targetSdk 35->36, buildTools 37.0.0 (minSdk unchanged)

- coroutines 1.6.4->1.9.0 (K2 runTest skew), Robolectric 4.14->4.16.1 (SDK 36 needs JDK 21)

- buildsystem 0.2.5->0.2.6; android.newDsl=false (AGP9 stopgap)

- AGP9 built-in Kotlin (remove kotlin-android, kotlinOptions->kotlin{}), resValues, proguard-optimize

- testapp: fix K2 getChars (cast to GetChars) + pin androidx.core 1.5.0; remove stray import

- common submodule -> ridamarora/sdkupgrade (upgraded common)

- CI: PR-branch jobs (build_test, lint, msalautomationapp) -> JDK 21; dev baseline stays 17
msal_default_config is a MAIN resource, so under AGP 9 (non-transitive R only) it lives in the module R (com.microsoft.identity.msal.R), not the androidTest R (…msal.test.R). Fully-qualify the reference; the .test.R import stays for the test_* androidTest resources. Fixes :msal:compileLocalDebugAndroidTestJavaWithJavac 'cannot find symbol msal_default_config'.
…enting them out

Keep ':testapps:automationapp' and ':testapps:sample' as active includes but wrap each in a directory-existence check, so they configure when the project dir is present and don't hard-fail under Gradle 9 when it isn't (a plain checkout only has 'testapp'). Addresses review feedback to not leave these commented.
Merge dev f750efd while preserving compileSdk 37, targetSdk 36, existing minSdk levels and Java 8 bytecode. Advance Common to pushed recovery revision 7f886b336bae320cb8bd6ed7a6da49ab01898c94. Reconcile Kotlin compatibility, coverage inputs, explicit AGP publication components and sample R8 annotation handling.

Validated local and pinned distribution assemblies, both 868-test suites, coverage, lint, Android-test compilation and automation/sample builds. Shared SpotBugs NO-SOURCE wiring and the optional benchmark flavor-selection blocker remain documented and acknowledged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ridam-arora
ridam-arora requested review from a team as code owners November 17, 2026 22:34
Copilot AI balanced review requested due to automatic review settings November 17, 2026 22:34
@github-actions

Copy link
Copy Markdown

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The SpotBugs integration can pass as NO-SOURCE under AGP 9 without analyzing the library, silently bypassing an existing CI validation check.

1 open issue
What changed in this PR

This PR upgrades MSAL Android’s build toolchain to Gradle 9.3.1, AGP 9.1.1, and JDK 21, with compatibility updates across the library, test apps, and validation pipelines.

Changes:

  • Adopt AGP’s built-in Kotlin support and update SDK and dependency versions.
  • Adjust coverage, publication, and project configuration for the upgraded tools and builds without Common sources.
  • Update test compatibility, CI Java versions, and contributor verification guidance.
File Description
testapps/​testapp/​src/​main/​java/​com/​microsoft/​identity/​client/​testapp/​nativeauth/​SignUpPasswordFragment.kt Access password characters through GetChars.
testapps/​testapp/​src/​main/​java/​com/​microsoft/​identity/​client/​testapp/​nativeauth/​PasswordResetNewPasswordFragment.kt Update password extraction for compatibility.
testapps/​testapp/​src/​main/​java/​com/​microsoft/​identity/​client/​testapp/​nativeauth/​EmailPasswordSignInSignUpFragment.kt Update password extraction in both authentication flows.
testapps/​testapp/​src/​main/​java/​com/​microsoft/​identity/​client/​testapp/​nativeauth/​EmailAttributeSignUpFragment.kt Copy password characters only when a buffer exists.
testapps/​testapp/​proguard-rules.pro Suppress warnings for a compile-time annotation.
testapps/​testapp/​build.gradle Adopt built-in Kotlin and adjust resource, shrinking, and dependency configuration.
settings.gradle Guard optional projects and update credential-property lookup.
msalautomationapp/​build.gradle Adopt built-in Kotlin and explicitly enable resource values.
msal/​src/​test/​java/​com/​microsoft/​identity/​client/​e2e/​tests/​network/​nativeauth/​SignInEmailPasswordTest.kt Remove an unused annotation import.
msal/​src/​androidTest/​java/​com/​microsoft/​identity/​client/​PublicClientConfigurationTest.java Reference the library’s non-transitive resource class.
msal/​src/​androidTest/​AndroidManifest.xml Remove manifest-level SDK overrides.
msal/​build.gradle Update plugins, Kotlin configuration, coverage paths, publication, and conditional dependencies.
gradle/​wrapper/​gradle-wrapper.properties Upgrade the Gradle wrapper to 9.3.1.
gradle/​versions.gradle Update AGP, Kotlin, Android SDK, and test dependencies.
gradle.properties Retain legacy Android DSL compatibility temporarily.
azure-pipelines/​pull-request-validation/​pr-msalautomationapp.yml Switch automation-app validation to JDK 21.
azure-pipelines/​pull-request-validation/​pr-msal.yml Switch library validation tasks to JDK 21.
AGENTS.md Document upgraded tooling, distribution checks, and verification limitations.

Review effort: Balanced

Comment thread msal/build.gradle

plugins {
id 'com.microsoft.identity.buildsystem' version '0.2.5'
id 'com.microsoft.identity.buildsystem' version '0.3.0'
ridam-arora and others added 2 commits November 17, 2026 19:38
Replace eager task realization so SpotBugs discovers AGP javac tasks. Enable XML reports and baseline approved findings by class, method and detector without globally disabling checks. Align the continuation-token nullability contract and make the helper activity template static final.

Validated local debug/release and DIST release SpotBugs reports: 157 classes analyzed with zero unsuppressed findings each. Clean assemblies, 65 focused tests, Android-test compilation, lint and publication metadata pass. Existing missing Android/JSON analysis-class diagnostics remain a separate limitation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consume latest Common dev reconciliation. Validated local debug/release assembly, Android-test compilation, 868 JVM tests with zero failures, coverage, lint and actual SpotBugs analysis.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants